
// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import { $http } from '@escook/request-miniprogram'
import store from './store/store'
Vue.config.productionTip = false
uni.$http = $http
// 错误的提示信息
uni.$showMsg=function(title="数据请求失败",duration=1500){
	uni.showToast({
		title,
		duration,
		icon:"none"
	})
	
}
App.mpType = 'app'
$http.baseUrl = 'https://api-ugo-web.itheima.net/api/public/v1'
$http.beforeRequest=function(option){
	 uni.showLoading({
	    title: '数据加载中...',
	  })
}
// 请求完成之后做一些事情
$http.afterRequest = function () {
  uni.hideLoading()
}
const app = new Vue({
    ...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif